import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  { path: '/', name: 'login', component: () => import('../views/Login/Login.vue') },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/Home/Home.vue'),
    children: [
      // 首页
      { path: '/index', name: 'index', component: () => import('../views/Index/Index.vue') },
      //首页轮播图管理
      { path: '/Carousel', name: 'Carousel', component: () => import('../views/Index/Carousel.vue') },
      //导航图标管理
      { path: '/Navigation', name: 'Navigation', component: () => import('../views/Index/Navigation.vue') },
      //商品推荐管理
      { path: '/recommend', name: 'recommend', component: () => import('../views/Index/recommend.vue') },
      //公告管理
      { path: '/Notice', name: 'Notice', component: () => import('../views/Index/Notice.vue') },
      //退货地址管理
      { path: '/Goods', name: 'Goods', component: () => import('../views/Index/Goods.vue') },
      //分类管理
      { path: '/Classification', name: 'Classification', component: () => import('../views/Index/Classification.vue') },
      //一键上传
      { path: '/Upload', name: 'Upload', component: () => import('../views/Index/Upload.vue') },
      // 登录
      { path: '/login', name: 'Login', component: () => import('../views/Login/Login.vue') },
      // 商品管理
      { path: '/shop', name: 'shop', meta: { title: '商品列表' }, component: () => import('../views/Shop/ShopList/S_ShopList.vue') },
      { path: '/shop_one', name: 'shop_one', component: () => import('../views/Shop/ShopList/S_AddShop.vue') },
      { path: '/shop_put/:id', name: 'shop_put', component: () => import('../views/Shop/ShopList/lwjadd.vue') },
      { path: '/groupadd', name: 'groupadd', meta: { title: '商品组添加' }, component: () => import('../views/Shop/ShopGroup/S_AddGroup.vue') },
      { path: '/groupdata/:id', name: 'groupdata', meta: { title: '商品组修改' }, component: () => import('../views/Shop/ShopGroup/S_AddGroup_Put.vue') },
      { path: '/group', name: 'group', meta: { title: '商品组' }, component: () => import('../views/Shop/ShopGroup/S_Group.vue') },
      { path: '/classify', name: 'classify', meta: { title: '分类管理' }, component: () => import('../views/Shop/ShopClassify/S_Classify.vue') },
      { path: '/brand', name: 'brand', meta: { title: '品牌管理' }, component: () => import('../views/Shop/ShopBrand/S_Brand.vue') },
      { path: '/detailsa', name: 'detailsa', meta: { title: '品牌管理' }, component: () => import('../views/Shop/ShopBrand/onSubmit.vue') },
      { path: '/goodsApp', name: 'goodsApp', meta: { title: '品牌管理' }, component: () => import('../views/Shop/ShopBrand/goodsApp.vue') },
      { path: '/setup', name: 'setup', meta: { title: '设置' }, component: () => import('../views/Shop/ShopSetUp/S_SetUp.vue') },
      { path: '/mybrad', name: 'mybrad', meta: { title: '设置' }, component: () => import('../views/Shop/ShopBrand/Newmybrad.vue') },

      // 订单管理
      { path: '/order', name: 'order', component: () => import('../views/Order/OrderView/Order.vue') },
      { path: '/orderIndex', name: 'orderIndex', meta: { title: '分类管理' }, component: () => import('../views/Order/OrderStataus/OrderIndex.vue') },
      { path: '/activistIndex', name: 'activistIndex', component: () => import('../views/Order/OrderActivist/ActivistIndex.vue') },
      { path: '/batchSend', name: 'batchSend', component: () => import('../views/Order/OrderUtils/BatchSend.vue') },

      // 财务管理
      { path: '/financial', name: 'financial', component: () => import('../views/Financial/Financial.vue') },
      { path: '/leaveQuota', name: 'leaveQuota', component: () => import('../views/Financial/LeaveQuota.vue') },
      { path: '/billSupervise', name: 'billSupervise', component: () => import('../views/Financial/BillSupervise.vue') },
      { path: '/fullRecord', name: 'fullRecord', component: () => import('../views/Financial/FullRecord.vue') },

      // 优惠管理
      { path: '/sale', name: 'sale', component: () => import('../views/Sale/Sale.vue') },
      { path: '/sale_Discount', name: 'Sale_Discount', component: () => import('../views/Sale/Sale_Discount.vue') },
      { path: '/sale_Discount/add', name: 'Sale_Discount_add', component: () => import('../views/Sale/add.vue') },

      // 会员管理
      { path: '/vipList', name: 'vipList', component: () => import('../views/Vip/VipList.vue') },
      { path: '/vipSummary', name: 'vipSummary', component: () => import('../views/Vip/vipSummary.vue') },
      { path: '/vipGrade', name: 'vipGrade', component: () => import('../views/Vip/vipGrade.vue') },
      { path: '/vipGrouping', name: 'vipGrouping', component: () => import('../views/Vip/vipGrouping.vue') },
      { path: '/vipList/details/:id', name: 'vipLists', component: () => import('../views/Vip/details.vue') },
      { path: '/vipGrade/addGrade', name: 'vipGrades', component: () => import('../views/Vip/addGrade.vue') },
      { path: '/vipGrade/Gradedil/:id', name: 'vipGradel', component: () => import('../views/Vip/Gradedil.vue') },

      // 活动管理
      { path: '/seckillAdmin', name: 'seckillAdmin', component: () => import('../views/Seckill/seckillAdmin.vue') },
      { path: '/doughAdmin', name: 'doughAdmin', component: () => import('../views/Seckill/doughAdmin.vue') },
      { path: '/huichang', name: 'huichang', component: () => import('../views/Seckill/lfyAddHuichang.vue') },

      // 积分商城
      { path: '/integral', name: 'integral', component: () => import('../views/Integral/XGoodsList/Integral.vue') },
      { path: '/xeditList', name: 'edit', component: () => import('../views/Integral/XGoodsList/addList.vue') },
      { path: '/editList', name: 'editList', component: () => import('../views/Integral/XGoodsList/editList.vue') },
      { path: '/bananerAdmin', name: 'bananerAdmin', component: () => import('../views/Integral/banner/bananerAdmin.vue') },
      { path: '/classifyAdmin', name: 'classifyAdmin', component: () => import('../views/Integral/classify/classifyAdmin.vue') },
      { path: '/stateAdmin', name: 'stateAdmin', component: () => import('../views/Integral/State/stateAdmin.vue') },
      { path: '/xdetail', name: 'detail', component: () => import('../views/Integral/State/detail.vue') },
      { path: '/sendCheck', name: 'sendCheck', component: () => import('../views/Integral/State/sendCheck.vue') },
      { path: '/delivery', name: 'delivery', component: () => import('../views/Integral/State/delivery.vue') },

      // 权限管理
      { path: '/storeAdmin', name: 'storeAdmin', component: () => import('../views/Jurisdiction/storeAdmin.vue') },
      { path: '/adminAdmin', name: 'adminAdmin', component: () => import('../views/Jurisdiction/adminAdmin.vue') },
      { path: '/clerkAdmin', name: 'clerkAdmin', component: () => import('../views/Jurisdiction/clerkAdmin.vue') },
      { path: '/WithdrawalAudit', name: 'WithdrawalAudit', component: () => import('../views/Jurisdiction/WithdrawalAudit.vue') },
      { path: '/roleAdmin', name: 'roleAdmin', component: () => import('../views/Jurisdiction/roleAdmin.vue') },
      // 权限操作
      //添加门店
      { path: '/addStore', name: 'addStore', component: () => import('../views/Jurisdiction/storeAdmin/AddStore.vue') },
      //编辑店员页面
      { path: '/editAdmin', name: 'editAdmin', component: () => import('../views/Jurisdiction/adminAdmin/EditAdmin.vue') },
      //查看门店页面
      { path: '/viewStore', name: 'viewStore', component: () => import('../views/Jurisdiction/storeAdmin/ViewStore.vue') },
      //修改门店信息
      { path: '/information', name: 'information', component: () => import('../views/Jurisdiction/storeAdmin/Information.vue') },
      //添加角色
      { path: '/addRole', name: 'addRole', component: () => import('../views/Jurisdiction/roleAdmin/AddRole.vue') },
      //修改店员
      { path: '/clerkModify', name: 'clerkModify', component: () => import('../views/Jurisdiction/clerkAdmin/clerkModify.vue') },
      //添加店员
      { path: '/addClerk', name: 'addClerk', component: () => import('../views/Jurisdiction/clerkAdmin/addClerk.vue') },

      //添加管理员
      { path: '/addAdmin', name: 'addAdmin', component: () => import('../views/Jurisdiction/adminAdmin/Addadmin.vue') },

      // 评价管理
      { path: '/eva', name: 'eva', component: () => import('../views/Evaluate/EvalList/Evaluate.vue') },
      { path: '/lookUp', name: 'check', component: () => import('../views/Evaluate/EvalList/LookUp.vue') },
      { path: '/verify', name: 'verify', component: () => import('../views/Evaluate/EvalList/Verify.vue') },
      { path: '/response', name: 'response', component: () => import('../views/Evaluate/EvalList/Response.vue') },
      { path: '/virtual', name: 'virtual', component: () => import('../views/Evaluate/VirtualList/VirtualEval.vue') },

      // 信息管理
      { path: '/mess', name: 'mess', component: () => import('../views/Message/mess.vue') },
      { path: '/Cooperation', name: 'Cooperation', component: () => import('../views/Message/Cooperation.vue') },
      { path: '/Questions', name: 'Questions', component: () => import('../views/Message/question/Questions.vue') },
      { path: '/questionDetail', name: 'questionDetail', component: () => import('../views/Message/question/questionDetail.vue') },
      { path: '/answerDetail', name: 'answerDetail', component: () => import('../views/Message/question/answerDetail.vue') },
    ],
  },
]

const router = new VueRouter({
  routes,
  mode: 'hash',
})

export default router
